<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'addPage.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=path %>/css/mine.css" type="text/css" rel="stylesheet">
	<link href="<%=path %>/css/custom.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=path %>/js/privilege.js"></script>
	<script type="text/javascript" src="<%=path %>/js/dream_plugins.js"></script>
	<script type="text/javascript" src="<%=path%>/js/jquery-1.8.3.min.js"></script>

  </head>
  
  <body>
    <div class="div_head">
		<span> <span style="float:left">当前位置是：用户管理  》 添加菜单</span> <span
			style="float:right;margin-right: 8px;font-weight: bold"> <a
				style="text-decoration: none" href="./admin.php?c=goods&a=showlist">【主页】</a>
		</span>
		</span>
	</div>
	<input type="button" value="添加一级菜单" onclick="addOneMenu()"/>&nbsp;&nbsp;
	<input type="button" value="添加二级菜单" onclick="addTwoMenu()">
	
	<form action="" id="onemenu" name="onemenu" method="post" style="">
	<table id="onemenutable" style="display: none">
	<tr>
	<td><label>名称:<input id="onename" type="text" name="privilege.name"> </label> </td>
	</tr><tr>
	<td><label>&nbsp;URL:<input id="oneurl" type="text" name="privilege.url"> </label> </td>
	</tr>
	<tr align="center">
	<td colspan="2"><input type="button" value="提交" onclick="saveaddOneMenu('onemenu','Privilege_saveOne')">
	&nbsp;<input type="reset" value="重置">
	 </td>
	</tr>
	</table>
	</form>
	
	
	<form action="" id="twomenu" name="twomenu" method="post">
	<table id="twomenutable" style="display:none ">
	<tr>
	<td><label>一级菜单:
	<select name="parentId" id="parentid">
	<option value="0">----请选择菜单----</option>
	<s:iterator value="#session.topprivilegeadd">
	<option value="${id}">${name}</option>
	</s:iterator>
	</select>
	</tr><tr>
	<td><label>&nbsp;&nbsp;&nbsp;&nbsp;名称:<input id="twoname" type="text" name="privilege.name"> </label> </td>
	</tr><tr>
	<td><label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL:<input id="twourl" type="text" name="privilege.url"> </label> </td>
	</tr>
	<tr align="center">
	<td colspan="2" ><input type="button" value="提交" onclick="saveaddtwoMenu('twomenu','Privilege_savetwo')">
	&nbsp;<input type="reset" value="重置">
	 </td>
	
	</tr>
	</table>
	</form>
	
  </body>
</html>
